import prettytable as pt

def show_ticket(row_num):
    tb = pt.PrettyTable()
    # 标题
    tb.field_names = ['TicketNumber', 'no1', 'no2', 'no3']

    for i in range(row_num):
        tb.add_row([f'第{i+1}排','有票','有票','有票'])
    print(tb)

def order_ticket(row_num, row, column):
    tb = pt.PrettyTable()
    # 标题
    tb.field_names = ['TicketNumber', 'no1', 'no2', 'no3']

    for i in range(row_num):
        lst = [f'第{i + 1}排', '有票', '有票', '有票']

        if int(row) == i + 1:
            lst[int(column)] = '已售'
            tb.add_row(lst)
        else:
            tb.add_row(lst)

    print(tb)

if __name__ == '__main__':
    row_num = 6
    show_ticket(6)
    s = input('输入几排几座，1,2代表1排2座:')
    row,column=s.split(',')
    order_ticket(row_num, row, column)